﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link href="/resource/css/admin/main.css" type="text/css" rel="stylesheet" />
<link href="/resource/css/admin/right.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/resource/js/jquery.js"></script>
<script type="text/javascript" src="/resource/js/base.js"></script>
<script type="text/javascript" src="/resource/js/admin/createcolumns.js"></script>
</head>
<body>
    <div class="position"><span>您的当前位置：</span>静态生成 > 生成栏目HTML</div>
    <div class="rightbody f">
		<div class="rightbodycontent">
		    <table class="tools">
		    	<tr>
		        	<td>
		            	<b>生成选项：</b>
		                <label><input type="checkbox" id="createarticleauto" />同时生成相关详细页面</label>
		            </td>
		            <td align="right">
		                <a onclick="createcolumnsbyselected()" class="linkbtn file">生成所选栏目静态</a>
		            </td>
		        </tr>
		    </table>
		    <table cellspacing="1" cellpadding="4" class="tablelist">
		        <tr>
		            <th><input type="checkbox" onclick="selectallcheckbox(this)" /></th>
		            <th width="20%">栏目名称</th>
		            <th>URL地址</th>
		            <th>数据模型</th>
		            <th>操作</th>
		        </tr>
                <#list columns1es as columns1>
                    <tr class="splittr">
                        <td align="center"><input type="checkbox"<#if columns1.columnsType.id != 1> disabled<#else> name="ids" value="${columns1.id}" onchange="$('.cbid${columns1.id}').attr('checked', this.checked)"</#if> /></td>
                        <td align="center">${columns1.name}</td>
                        <td align="center">
                            <#assign columns1urldirectory = "">
                            <#if columns1.columnsType.id == 1 || columns1.columnsType.id == 3>
                            <#assign columns1urldirectory = "/" + columns1.urldirectory + "/">
                            <#elseif columns1.columnsType.id == 2>
                            <#assign columns1urldirectory = "/" + columns1.zhuanti.urldirectory + "/">
                            <#elseif columns1.columnsType.id == 5>
                            <#assign columns1urldirectory = "/" + columns1.urldirectory + "/">
                            <#else>
                            <#assign columns1urldirectory = "--无链接--">
                        </#if>
                        ${columns1urldirectory}
                        </td>
                        <td align="center"><#if columns1.datamodel??>${columns1.datamodel.name}</#if></td>
                        <td align="center">
                            <#if columns1.columnsType.id == 1>
                            <a onclick="createcolumns(${columns1.id})" class="linkbtn file noborder" onclick="return confirm('确定生成静态HTML吗？')">生成静态</a>
                            <#else>
                            <a onclick="alert('非文档列表栏目不允许生成静态页面')" class="linkbtn file noborder gray">生成静态</a>
                        </#if>
                        </td>
                    </tr>
                    <#if columns2Maps?keys?seq_contains(columns1.id?c)>
                        <#list columns2Maps[columns1.id?c] as columns2>
                            <tr class="second${columns1.id}"  >
                                <td align="center"><input type="checkbox" name="ids" value="${columns2.id}" class="cbid${columns2.parentId}" /></td>
                                <td style="padding-left:8%">　┝ ${columns2.name}</td>
                                <td align="center">
                                    <#assign columns2urldirectory = "/" + columns2.urldirectory + "/">
                                    <#if columns1.columnsType.id == 1 || columns1.columnsType.id == 2 || columns1.columnsType.id == 3>
                                    <#assign columns2urldirectory = "/" + columns1.urldirectory + columns2urldirectory>
                                </#if>
                                ${columns2urldirectory}
                                </td>
                                <td align="center">${columns2.datamodel.name}</td>
                                <td align="center">
                                    <a onclick="createcolumns(${columns2.id})" class="linkbtn file noborder" onclick="return confirm('确定生成静态HTML吗？')">生成静态</a>
                                </td>
                            </tr>
                        </#list>
                    </#if>
                </#list>
		    </table>
	    </div>
    </div>
</body>
</html>